Skip to content

fix: add on_permission_request handler for SDK >= 0.1.28#10

Merged
mowree merged 3 commits intomicrosoft:mainfrom
HDMowri:hotfix/sdk-0.1.28-permission-handler
Feb 28, 2026
Merged

fix: add on_permission_request handler for SDK >= 0.1.28#10
mowree merged 3 commits intomicrosoft:mainfrom
HDMowri:hotfix/sdk-0.1.28-permission-handler

Conversation

@HDMowri
Copy link
Contributor

@HDMowri HDMowri commented Feb 28, 2026

SDK v0.1.28 requires on_permission_request when creating sessions. Uses try/except for backward compatibility with older SDK versions.

Refs: github/copilot-sdk#509, #554

SDK v0.1.28 requires on_permission_request when creating sessions.
Uses try/except for backward compatibility with older SDK versions.

Refs: github/copilot-sdk#509, #554

Co-authored-by: GitHub Copilot <copilot@github.com>
@mowree mowree requested a review from Copilot February 28, 2026 00:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a compatibility shim in the Copilot client wrapper so sessions created with Copilot SDK >= 0.1.28 provide the newly-required on_permission_request handler, while remaining compatible with older SDK versions.

Changes:

  • Set session_config["on_permission_request"] when copilot.types.PermissionHandler (and its expected helper) is available.
  • Guard the new behavior with try/except (ImportError, AttributeError) for backward compatibility.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

HDMowri and others added 2 commits February 27, 2026 17:43
- Add disable_sdk_bundled_binary fixture for mount tests (SDK now bundles binary)
- Fix streaming timeout test: CopilotTimeoutError -> LLMTimeoutError
- Add xfail for Gemini 25_describe scenario (LLM behavioral variance)
- Refactor ARM64 skip to class-level decorator (DRY)
- Rewrite model snapshot test: full 18-model list, fail on diff instead of skip

Co-authored-by: GitHub Copilot <copilot@github.com>
@mowree mowree merged commit 3cc88f1 into microsoft:main Feb 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants